package com.haikesi.api.voicecontrol.domain.vo;

import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

import javax.validation.constraints.NotNull;

@Data
@EqualsAndHashCode(callSuper = false)
public class VoiceControlSearchVO {


    @ApiModelProperty(value = "声音内容")
    private String voiceContent;

    @ApiModelProperty(value = "控制模式名称")
    private String voiceModeName;

    @ApiModelProperty(value = "设备所属组织机构ID",hidden = true)
    private String organizationId;


    @ApiModelProperty(value = "页数")
    private Integer pageNum;
    @ApiModelProperty(value = "每页行数")
    private Integer pageSize;

    public Integer getPageNum() {
        if(pageNum == null){
            pageNum = 1;
        }
        return pageNum;
    }
    public Integer getPageSize() {
        if(pageSize == null){
            pageSize = 20;
        }
        if(pageSize > 100){
            pageSize = 100;
        }
        return pageSize;
    }

}